class Main extends egret.DisplayObjectContainer {

    public constructor() {
        super();
        /*
        let rt:ResTest = new ResTest();
        this.addChild(rt);
        ResTest.fnPrint();
        
        let reg:RegExp = /\d+/;
		var ret:RegExpExecArray = reg.exec("attack01");
        console.log("ret.index",ret.index,ret.length,ret);

       
        let ary:Array<number> = new Array<number>(5,1,4,2,3);       
        ary.sort.call(this,this.myFn);
        
        */


        /*
        let tm:TimerTest = new TimerTest();
        this.addChild(tm);
        tm.x = 10;
        tm.y = 150;
        
        let v:VideoTest = new VideoTest();
        this.addChild(v);
        */
        //egret.Capabilities
        AnimationMgr.getInstance().init();
        //调试
        this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAdded,this);
        
    }

    private onAdded(e:egret.Event):void
    {        
        console.log('this.stage.width',this.stage.width);
        console.log("egret.Capabilities",egret.Capabilities.boundingClientWidth);
        
        let rt:ResTest = new ResTest();
        this.addChild(rt);
    }
    private myFn(argA:number,argB:number):number
    {
        console.log("myFn argA argB",argA,argB);
        return 0;
    }

}